<?
	$id = Request::$current->param('id');
	if (!empty($id)) {
		$active = array('form' => 'active', 'list' => '');
	} else {
		$active = array('form' => '', 'list' => 'active');
	} 
?>
<div class="tabbable tabs-<?= (empty($_COOKIE['tabs-view'])) ? 'left' : $_COOKIE['tabs-view'] ?>">
	<ul class="nav nav-tabs">
		<li class="<?= $active['list'] ?> myTab"><a href="#tab1" data-toggle="tab"><i class="icon-list" style="margin-right: 10px"></i>Список</a></li>
		<li class="<?= $active['form'] ?> myTab"><a href="#tab2" data-toggle="tab" onclick="showForm()"><i class="icon-pencil" style="margin-right: 10px"></i>Добавить \ редактировать</a></li>
		<li><a href="#tab3" data-toggle="tab" onclick="fileManagerInit(options)"><i class="icon-file" style="margin-right: 10px"></i>Файловый менеджер</a></li>
		<li class="dropdown">
			<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-eye-open" style="margin-right: 10px"></i>Вид <b class="caret"></b></a>
			<ul class="dropdown-menu content-view">
				<li><a href="javascript:void(0)" direction="top">Сверху</a></li>
				<li><a href="javascript:void(0)" direction="left">Слева</a></li>
				<li><a href="javascript:void(0)" direction="right">Справа</a></li>
				<li><a href="javascript:void(0)" direction="below">Снизу</a></li>
			</ul>
		</li>
	</ul>
	<div class="tab-content">
		<div class="tab-pane <?= $active['list'] ?>" id="tab1">
			<?= $list ?>
			<?= (!empty($pagination)) ? $pagination : '' ?>
		</div>
		<div class="tab-pane <?= $active['form'] ?>" id="tab2">
			<?= $form ?>
		</div>
		<div class="tab-pane" id="tab3">
			<div id="elfinder" style="margin-bottom: 20px"></div>
		</div>
	</div>
</div>